/**
 * @file SimDriverBoard.h
 * @author huangxiaozhu (xiaozhuhuang2014@163.com)
 * @brief 
 * @version 1.0.0
 * @date 2024-02-26
 * 
 * @copyright Copyright (c) 2024
 * 
 */

#include "tools/ManagerFactory/ManagerFactory.h"
#include "tools/CommonServer/CommonServer.h"

/**
 * @brief SimDriver模拟底板进程类。此对象是单例对象
 *        继承ManagerFactory，将底板的各种服务模块统一管理起来。
 * 
 */
class SimDriverBoard : public ManagerFactory
{
protected:
    SimDriverBoard();
    virtual ~SimDriverBoard();

public:
    static SimDriverBoard& Instance();

    bool Init();
    void Exit();

    bool Start();

protected:
    bool RegisterAndInitMgrs();             // 注册和初始化各个服务模块
    bool StartServer();                     // 驱动板作为服务端，启动。

private:
    CommonServerPtr m_server = nullptr;

    static SimDriverBoard m_instance;
};

